const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const menu = new Schema({
  menuData: {
    type: [Schema.Types.Mixed],
    required: true,
    unique: true,
    default: [
      {
        path: "/welcome",
        name: "welcome",
        icon: "smile",
        defaultValue: 'welcome',
        disableCheckbox: true,
        key: '0',
      },
      {
        path: '/menuManager',
        name: 'menuManager',
        icon: 'menu',
        defaultValue: 'menuManager',
        authority: ['admin'],
        key: '1',
      }
    ],
  },
  registerTime: {
    type: Date,
    default: Date.now,
  },
});
module.exports = mongoose.model("menu", menu);
